package com.gg.user.gguser.dao;

import com.gg.user.gguser.dataobject.GgBusinessOpportunityDtaobject;
import com.gg.user.gguser.dataobject.GgContractDataobject;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author yangxinlei
 * @date 2020/5/14
 */
@Mapper
public interface AppGetItemsDaoMapper {


    @Select("select gg_bo_name as ggBoName, gg_bo_id as ggBoId,date_format(gg_bo_update, '%Y-%m-%d') as ggBoUpdate from gg_businessopportunity where gg_bo_next_time>=#{dataString} ORDER BY gg_bo_time")
    List<GgBusinessOpportunityDtaobject> getTodayContactCustomer(@Param("dataString")String dataString);

    @Select("select count(*) from gg_businessopportunity where gg_bo_next_time>=#{dataString} ORDER BY gg_bo_time")
    Integer GgBusinessOpportunityDtaobjectCount(@Param("dataString")String dataString);

    @Select("select gg_c_institutional_name as ggCInstitutionalName,gg_c_id as ggCId,date_format(gg_c_due_time, '%Y-%m-%d') as ggCDueTime from gg_contract where gg_c_due_time>=#{dataString} ORDER BY gg_c_due_time")
    List<GgContractDataobject> getGgContractDataobject(@Param("dataString")String dataString);

    @Select("select count(*) from gg_contract where gg_c_due_time>=#{dataString} ORDER BY gg_c_due_time")
    Integer getGgContractDataobjectCount(@Param("dataString")String dataString);

}
